<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<HTML>
<HEAD>
  <META http-equiv="Content-Type" content="text/html; charset=utf-8">
  <TITLE>-p (设置密码) 选项</TITLE>
  <LINK href="../../style.css" rel=stylesheet type="text/css">
</HEAD>

<BODY>

<H1>-p (设置密码) 选项</H1>

<P>指定密码。</P>

<H4>语法</H4>

<PRE class="syntax">
-p{password}
</PRE>

<DL>
  <DT>{password}</DT>
  <DD>指定密码。</DD>
</DL>


<H4>示例</H4>

<PRE class="example">
7z a archive.7z -psecret -mhe *.txt
</PRE>

<P>压缩所有 *.txt 文件到 <SPAN class="filename">archive.zip</SPAN>，并设置密码为“secret”。同时加密压缩包文件头部(加密文件名)，(-mhe 选项)</P>

<PRE class="example">
7z x archive.zip -psecret
</PRE>

<P>提取设有密码“secret”的压缩包 <SPAN class="filename">archive.zip</SPAN> 中的所有文件。</P>

<H4>可以和此选项结合使用的命令</H4>

<P>
  <A href="../commands/add.htm">a (添加)</A>，
  <A href="../commands/delete.htm">d (删除)</A>，
  <A href="../commands/extract.htm">e (释放)</A>，
  <A href="../commands/test.htm">t (测试)</A>，
  <A href="../commands/update.htm">u (更新)</A>，
  <A href="../commands/extract_full.htm">x (完整路径释放)</A>
</P>

</BODY>
</HTML>
